import {get_cookie} from 'assets/cookie/cookie'
let ua = window.navigator.userAgent.toLowerCase();

// if (ua.search(/MicroMessenger/i)!==-1) {
//   if(!get_cookie('weixinKey')){
//     location.href='https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxe8c1f17e5314441a&redirect_uri=https://m.mingpinjiancai.com&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect'
//   }
// }

import 'babel-polyfill'
import Vue from 'vue'
import App from './App'
import router from './router'
import VueLazyload from 'vue-lazyload'
import 'swiper/dist/css/swiper.css'
import 'assets/sass/index.scss'
import store from './store'

Vue.use(VueLazyload, {
  preLoad: 0,
  attempt: 5,
  loading: require("assets/img/loading.png")
})
let vm = new Vue({
  store,
  router,
  el: '#app',
  render: h => h(App)
})

Vue.use({
  vm
})
